package com.etc.controller;

import com.etc.entity.CommentResult;
import com.etc.entity.Park;
import com.etc.service.ParkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ParkController {
    @Autowired
    private ParkService parkService;
    @RequestMapping("park/update")
    public CommentResult update(@RequestBody Park park){
        int result = parkService.update(park);
        if (result>0)
            return new CommentResult(200,"success!");
        else {
            return new CommentResult(444, "failed!");
        }
    }
}
